package com.ronan.common.exception;


import com.ronan.common.constant.CommonConstants;

/**
 * FileName    : com.withufuture.common.exception
 * Description :
 *
 * @author : ronan
 * @version : 1.0
 * Create Date : 2021/3/18 11:34
 **/
public class ApiException extends RuntimeException{

    private static final long serialVersionUID = 1L;
    private int code;

    public ApiException(String message) {
        super(message);
        this.code = CommonConstants.FAIL_BIZ;
    }

    public ApiException(int code, String message) {
        super(message);
        this.code = code;
    }

    public int getCode() {
        return this.code;
    }

    public void setCode(int code) {
        this.code = code;
    }
}
